#pragma once
#include "merger.h"

namespace Pdf
{
	class Merger::Inserter : public VisitorT<DefaultNone>
	{
	public:
		Inserter(InputDocument *document, Merger *merger);

	private:
		typedef std::map<Reference::Value, Reference::Value> ReferenceMap;

		virtual void     __fastcall visited(Array *obj);
		virtual void     __fastcall visited(Names *obj);
		virtual void     __fastcall visited(Dictionary *obj);
		virtual void     __fastcall visited(Reference *obj);

		InputDocument*              document;
		Merger*                     merger;
		ReferenceMap				inserted;
	};
}

#include "merger_inserter.inl"